﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:lang="clr-namespace:kernel"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:xctk="clr-namespace:Xceed.Wpf.Toolkit;assembly=WPFToolkit.Extended"
    xmlns:price="clr-namespace:kernel.gui.controllers" xmlns:gui="clr-namespace:kernel.gui"
    xmlns:Custom="http://metro.mahapps.com/winfx/xaml/controls" x:Class="kernel.gui.pages.OrderPage"
    mc:Ignorable="d">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="0*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="10" />
        </Grid.RowDefinitions>
        <GroupBox Header="{x:Static lang:Localization.details_Over_The_Phone}" Grid.Row="1" Grid.Column="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="97.667" />
                    <ColumnDefinition Width="425.333" />
                    <ColumnDefinition Width="10" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.phone_Taken}"
                           Grid.Row="1" />
                <xctk:DateTimePicker Grid.Column="3" Grid.Row="1" DefaultValue="{x:Static system:DateTime.Now}"
                                     x:Name="DateGet" CultureInfo="uk-UA" FormatString="d"
                                     Text="{x:Static gui:Controller.DateNowToString}" />
                <TextBlock Grid.Column="1" Grid.Row="3" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.kod_Imei}" TextAlignment="Center" />
                <price:ImeiBox Grid.Column="3" Grid.Row="3" />
                <TextBlock Grid.Column="1" Grid.Row="5" TextWrapping="Wrap" Text="{x:Static lang:Localization.firm}"
                           TextAlignment="Center" Margin="0,0,0,1" />
                <TextBox Grid.Column="1" Grid.Row="6" TextWrapping="Wrap" Margin="0,9,0,0" Grid.RowSpan="2" />
                <TextBlock Grid.Column="3" Grid.Row="5" TextWrapping="Wrap" Text="{x:Static lang:Localization.mark}"
                           TextAlignment="Center" />
                <TextBox Grid.Column="3" Grid.Row="7" TextWrapping="Wrap" />
                <Button Content="Button" Grid.Column="5" Grid.Row="5" Grid.RowSpan="3" />
            </Grid>
        </GroupBox>
        <GroupBox Grid.Column="1" Header="{x:Static lang:Localization.client_Identification}" Grid.Row="3">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="10" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.customer_S_Phone}" Grid.Row="1" />
                <xctk:MaskedTextBox x:Name="Telephone" Grid.Column="3" Grid.Row="1" TextAlignment="Center"
                                    TextWrapping="Wrap" Mask="+38(099)999-99-99" MaxLength="17" />
                <TextBlock Grid.Column="5" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.customer_Name}"
                           Grid.Row="1" />
                <TextBox x:Name="Clientname" Grid.Column="7" Grid.Row="1" TextWrapping="Wrap" />
            </Grid>
        </GroupBox>
        <GroupBox Grid.Column="1" Header="{x:Static lang:Localization.data_On_Problems_And_Work}" Grid.Row="5">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="50" />
                    <ColumnDefinition Width="50" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="10" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.problem_Description}"
                           Grid.Row="1" />
                <TextBox x:Name="ProblemDescription" Grid.Column="3" Grid.Row="1" TextWrapping="Wrap"
                         Grid.ColumnSpan="3" />
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.note_To_The_Problem}"
                           Grid.Row="3" />
                <TextBox x:Name="Notetotheproblem" Grid.Column="3" Grid.Row="3" TextWrapping="Wrap" Grid.ColumnSpan="3" />
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.the_Phone_Works}"
                           Grid.Row="5" />
                <RadioButton x:Name="Phoneready" Grid.Column="3" Grid.Row="5">
                    <TextBlock TextAlignment="Center" TextWrapping="Wrap" Text="{x:Static lang:Localization.yes}" />
                </RadioButton>
                <RadioButton x:Name="Phonenotready" Grid.Column="4" Grid.Row="5" IsChecked="True">
                    <TextBlock TextAlignment="Center" TextWrapping="Wrap" Text="{x:Static lang:Localization.no}" />
                </RadioButton>
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.completed_Works}"
                           Grid.Row="7" />
                <TextBox x:Name="Completedworks" Grid.Column="3" Grid.Row="7" TextWrapping="Wrap" Grid.ColumnSpan="3" />
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.note_To_Work}"
                           Grid.Row="9" />
                <TextBox x:Name="Notetowork" Grid.Column="3" Grid.Row="9" TextWrapping="Wrap" Grid.ColumnSpan="3" />
            </Grid>
        </GroupBox>
        <GroupBox Grid.Column="1" Header="{x:Static lang:Localization.calculations}" Grid.Row="7">
            <Grid>
                <Grid.Resources>
                    <price:NumericConverter x:Key="Myconverter" />
                    <price:NumericToValueTypeConverter x:Key="Mytypeconverter" />
                </Grid.Resources>
                <Grid.DataContext>
                    <price:TestDataModel />
                </Grid.DataContext>
                <Grid.RowDefinitions>
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="25*" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="150" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="25*" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="405" />
                    <ColumnDefinition Width="10" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.the_Amount_For_Part}"
                           Grid.Row="1" />
                <TextBlock Grid.Column="1" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.the_Amount_For_The_Work}"
                           Grid.Row="3" />
                <TextBlock x:Name="TheamountforParts" Grid.Column="3" TextAlignment="Center" TextWrapping="Wrap"
                           Text="0,00"
                           Grid.Row="1" />
                <TextBox x:Name="Theamountforthework" Grid.Column="3" Grid.Row="3" TextAlignment="Center"
                         TextWrapping="Wrap" MaxLength="17"
                         Text="{Binding TestDataDouble, Converter={StaticResource Myconverter}, Mode=TwoWay}"
                         price:TextBoxMaskBehavior.Mask="0:#,0.00##"
                         price:TextBoxMaskBehavior.ValueType="{Binding TestDataDouble, Converter={StaticResource Mytypeconverter}, Mode=OneWay}" />
                <TextBlock Grid.Column="5" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.price}"
                           Grid.Row="1" />
                <TextBlock x:Name="Price" Grid.Column="7" TextAlignment="Center" TextWrapping="Wrap" Text="0,00"
                           Grid.Row="1" />
                <TextBlock Grid.Column="5" TextAlignment="Center" TextWrapping="Wrap"
                           Text="{x:Static lang:Localization.paid}"
                           Grid.Row="3" />
                <TextBox x:Name="Paid" Grid.Column="7" Grid.Row="3" TextAlignment="Center" TextWrapping="Wrap"
                         MaxLength="17"
                         Text="{Binding TestDataDouble, Converter={StaticResource Myconverter}, Mode=TwoWay}"
                         price:TextBoxMaskBehavior.Mask="0:#,0.00##"
                         price:TextBoxMaskBehavior.ValueType="{Binding TestDataDouble, Converter={StaticResource Mytypeconverter}, Mode=OneWay}" />
                <Button Grid.Column="9" HorizontalAlignment="Left" Grid.Row="1" Width="113" Grid.RowSpan="3">
                    <TextBlock TextAlignment="Center" TextWrapping="Wrap"
                               Text="{x:Static lang:Localization.parts_List}" />
                </Button>
            </Grid>
        </GroupBox>
        <GroupBox Grid.Column="1" Header="{x:Static lang:Localization.order_Status}"
                  Grid.Row="9">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="306*" />
                    <ColumnDefinition Width="70" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="70" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="70" />
                    <ColumnDefinition Width="107*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="10" />
                </Grid.ColumnDefinitions>
                <RadioButton Content="{x:Static lang:Localization.adopted}" Grid.Column="2" Grid.Row="1"
                             IsChecked="True" />
                <RadioButton Content="{x:Static lang:Localization.ready}" Grid.Column="4" Grid.Row="1" />
                <RadioButton Content="{x:Static lang:Localization.given}" Grid.Column="6" Grid.Row="1" />
                <xctk:DateTimePicker Grid.Column="8" Grid.Row="1" DefaultValue="{x:Static system:DateTime.Now}"
                                     Text="{x:Static gui:Controller.DateNowToString}" CultureInfo="uk-UA"
                                     FormatString="d" />

            </Grid>
        </GroupBox>
        <Grid Grid.Column="1" Grid.Row="11">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="140*" />
                <ColumnDefinition Width="663*" />
                <ColumnDefinition Width="140*" />
                <ColumnDefinition Width="10" />
            </Grid.ColumnDefinitions>
            <Button x:Name="Cancel" Grid.Column="1">
                <TextBlock TextAlignment="Center" TextWrapping="Wrap" Text="{x:Static lang:Localization.cancellation}" />
            </Button>
            <Button Grid.Column="3">
                <TextBlock TextAlignment="Center" TextWrapping="Wrap" Text="{x:Static lang:Localization.save_Data}" />
            </Button>
        </Grid>
    </Grid>
</UserControl>